<!DOCTYPE html>
<html>
	<head>
		<!-- 设置浏览器不缓存 -->
		<META HTTP-EQUIV="pragma" CONTENT="no-cache">
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
		<meta http-equiv="Cache" content="no-cache">
		<META HTTP-EQUIV="expires" CONTENT="0">
		<!-- Content-Type -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<!-- Favicon -->
		<link rel="shortcut icon" href="./images/logo.png">
		<title>企业服务共享中心-代理记账</title>
		<!--stylesheets-->
		<link rel="stylesheet" href="./plugins/element/index.css">
		<script src="./plugins/vue/vue.js"></script>
		<script src="./plugins/element/index.js"></script>
		<script src="./plugins/vue/clipboard.js"></script>
		<script src="./plugins/axios/axios.min.js"></script>
		<!-- 		<script src="./js/common/function.js"></script> -->
		<script src="./js/common/public.js?v=0.8.0.3"></script>
		<!-- 自定义样式表 -->
		<link rel="stylesheet" href="./css/base.css?v=0.8.0.3">
	</head>
	<style type="text/css">
		.el-range-editor.el-input__inner {
			width: 200px;
		}

		.el-range-editor .el-range-input {
			width: 80px;
		}

		.el-form-item__datetimestyle .el-form-item__label {
			width: 50%;
		}

		.el-table__row .el-form-item__table .el-form-item__content {
			margin-left: 0px
		}

		.addkeepaccount .el-form-item {
			margin-bottom: 0px
		}

		.tableBox {
			th {
				padding: 0;
				height: 40px;
				line-height: 40px;
			}

			td {
				padding: 0;
				height: 40px;
				line-height: 40px;
			}
		}

		.tabledistribute .el-form-item {
			th {
				padding: 0;
				height: 0;
				line-height: 0;
			}

			td {
				padding: 0;
				height: 0;
				line-height: 0;
			}

			margin:0px
		}
	</style>
	<body>
		<div id="app">
			<template>
				<el-container class="maincontainer">
					<el-container class="submaincontainer">
						<el-card class="box-card" style="position:relative;width:330px" shadow="never" v-show="leftbar_show">
							<div style="position:absolute;left:0;top:0;right:0;bottom:0;overflow-y:auto;overflow-x:hidden;padding-left: 20px;padding-top: 20px;padding-right: 20px;">
								<el-form :model="queryForm" ref="queryForm">
									<el-form-item label="关键字" prop="keyword" maxlength="20" autocomplete="off">
										<el-input v-model="queryForm.keyword"></el-input>
									</el-form-item>
									<el-form-item label="旧账本" prop="distinct">
										<el-radio-group v-model="queryForm.distinct">
											<el-radio label="显示">显示</el-radio>
											<el-radio label="不显示">不显示</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="财税分组" prop="taxGroup">
										<el-select v-model="queryForm.taxGroup" filterable clearable>
											<el-option v-for="item in depts" :key="item.id" :label="item.name" :value="item.id">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="税务类型" prop="taxtype">
										<el-select v-model="queryForm.taxtype" filterable clearable>
											<el-option v-for="item in taxtypeoptions" :key="item.value" :label="item.label" :value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="税控盘" prop="TCP">
										<el-select v-model="queryForm.TCP" filterable clearable>
											<el-option v-for="item in TCPS" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="社保公积金" prop="sbgjj">
										<el-select v-model="queryForm.sbgjj" filterable clearable>
											<el-option v-for="item in sbgjjs" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="续费情况" prop="renew">
										<el-radio-group v-model="queryForm.renew">
											<el-radio label="续费">续费</el-radio>
											<el-radio label="未续费">未续费</el-radio>
											<el-radio label="">全部</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="月份" prop="month">
										<el-date-picker v-model="queryForm.month" type="month" value-format="yyyy-MM" placeholder="选择月份" value-format="yyyy-MM"
										 align="left">
										</el-date-picker>
									</el-form-item>
									<el-form-item label="状态" prop="status">
										<el-select v-model="queryForm.status" placeholder="请选择" filterable clearable>
											<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="相关人员" prop="personnel">
										<el-select v-model="queryForm.personnel" multiple placeholder="请选择" filterable>
											<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
											</el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="截止日期" prop="endTime">
										<el-date-picker v-model="queryForm.endTime" type="datetimerange" value-format="yyyy-MM-dd" :picker-options="pickerOptions"
										 range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="left">
										</el-date-picker>
									</el-form-item>
<!--									<el-form-item label="更新时间" prop="updateTime">-->
<!--										<el-date-picker v-model="queryForm.updateTime" type="datetimerange" value-format="yyyy-MM-dd" :picker-options="pickerOptions"-->
<!--										 range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="left">-->
<!--										</el-date-picker>-->
<!--									</el-form-item>-->
									<el-form-item>
										<el-button size="small" type="primary" @click.native.prevent="start" style="position:fixed;left:20px;bottom:5px;">查 询</el-button>
									</el-form-item>
								</el-form>
							</div>
						</el-card>

						<el-card class="box-card" style="width:100%" shadow="never">
							<div slot="header" class="clearfix">
								<i v-on:click="showLeftBar()" v-bind:class="[leftbar_show ? 'el-icon-s-fold' : 'el-icon-s-unfold']" style="color:#409EFF;cursor:pointer;"></i>
								<span>代理记账列表</span>
								<el-button-group style="float: right;margin-top:0px;">
									<el-tooltip v-for="item in toolbar" class="item" effect="dark" v-bind:content="item.content" placement="top-start">
										<el-button size="small" v-bind:icon="item.icon" v-bind:type="item.type" @click="toolAction(item.content)"
										 v-show="item.ifshow">{{item.content}}</el-button>
									</el-tooltip>
								</el-button-group>
							</div>
							<div>
								<el-table ref="multipleTable" @select='selectionChange' :data="pagedata" tooltip-effect="dark" :height="tableHeight"
								 border highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange" row-key="id"
								 @expand-change="clickTable">
									<el-table-column type="selection" min-width="40">
									</el-table-column>

									<el-table-column type="expand">
										<template slot-scope="props">
											<el-form label-position="left" inline class="demo-table-expand">
												<el-table :data="accountDetailstableForm[props.$index]" style="width: 100%" height="700">
													<el-table-column prop="month" label="月份" width="80" fixed :filters="filtersMonth" :filter-method="filterHandler">
													</el-table-column>
													<el-table-column label="资料收集">
														<el-table-column prop="data[0].status" label="状态" width="70">
														</el-table-column>
														<el-table-column prop="data[0].charger" label="担当者" width="70">
														</el-table-column>
														<el-table-column prop="data[0].updateTime" label="更新日期" width="100">
														</el-table-column>
														<el-table-column label="操作" min-width="30">
															<template slot-scope="scope">
																<el-link icon="el-icon-edit" type="primary" @click="edititem(scope.$index, scope.row,0)" v-if="localStorage.getItem('USERID')==scope.row.data[0].chargerId||localStorage.getItem('USERID')==scope.row.leaderId||localStorage.getItem('ISLEADER')=='是'"></el-link>
															</template>
														</el-table-column>
													</el-table-column>
													<el-table-column label="社保、公积金">
														<el-table-column prop="data[1].status" label="状态" width="70">
														</el-table-column>
														<el-table-column prop="data[1].charger" label="担当者" width="70">
														</el-table-column>
														<el-table-column prop="data[1].updateTime" label="更新日期" width="100">
														</el-table-column>
														<el-table-column label="操作" min-width="30">
															<template slot-scope="scope">
																<el-link icon="el-icon-edit" type="primary" @click="edititem(scope.$index, scope.row,1)" v-if="localStorage.getItem('USERID')==scope.row.data[1].chargerId||localStorage.getItem('USERID')==scope.row.leaderId||localStorage.getItem('ISLEADER')=='是'"></el-link>
															</template>
														</el-table-column>
													</el-table-column>
													<el-table-column label="抄税 小规模季度">
														<el-table-column prop="data[2].status" label="状态" width="70">
														</el-table-column>
														<el-table-column prop="data[2].charger" label="担当者" width="70">
														</el-table-column>
														<el-table-column prop="data[2].updateTime" label="更新日期" width="100">
														</el-table-column>
														<el-table-column label="操作" min-width="30">
															<template slot-scope="scope">
																<el-link icon="el-icon-edit" type="primary" v-show="scope.row.data[2].updateTime!=''" @click="edititem(scope.$index, scope.row,2)" v-if="localStorage.getItem('USERID')==scope.row.data[2].chargerId||localStorage.getItem('USERID')==scope.row.leaderId||localStorage.getItem('ISLEADER')=='是'"></el-link>
															</template>

														</el-table-column>
													</el-table-column>
													<el-table-column label="国税 小规模季度">
														<el-table-column prop="data[3].status" label="状态" width="70">
														</el-table-column>
														<el-table-column prop="data[3].charger" label="担当者" width="70">
														</el-table-column>
														<el-table-column prop="data[3].updateTime" label="更新日期" width="100">
														</el-table-column>
														<el-table-column label="操作" min-width="30">
															<template slot-scope="scope">
																<el-link icon="el-icon-edit" type="primary" v-show="scope.row.data[3].updateTime!=''" @click="edititem(scope.$index, scope.row,3)" v-if="localStorage.getItem('USERID')==scope.row.data[3].chargerId||localStorage.getItem('USERID')==scope.row.leaderId||localStorage.getItem('ISLEADER')=='是'"></el-link>
															</template>
														</el-table-column>
													</el-table-column>
													<el-table-column label="个税 每月">
														<el-table-column prop="data[4].status" label="状态" width="70">
														</el-table-column>
														<el-table-column prop="data[4].charger" label="担当者" width="70">
														</el-table-column>
														<el-table-column prop="data[4].updateTime" label="更新日期" width="100">
														</el-table-column>
														<el-table-column label="操作" min-width="30">
															<template slot-scope="scope">
																<el-link icon="el-icon-edit" type="primary"  @click="edititem(scope.$index, scope.row,4)" v-if="localStorage.getItem('USERID')==scope.row.data[4].chargerId||localStorage.getItem('USERID')==scope.row.leaderId||localStorage.getItem('ISLEADER')=='是'"></el-link>
															</template>
														</el-table-column>
													</el-table-column>
													<el-table-column label="清卡 每月">
														<el-table-column prop="data[5].status" label="状态" width="70">
														</el-table-column>
														<el-table-column prop="data[5].charger" label="担当者" width="70">
														</el-table-column>
														<el-table-column prop="data[5].updateTime" label="更新日期" width="100">
														</el-table-column>

														<el-table-column label="操作" min-width="30">
															<template slot-scope="scope">
																<el-link icon="el-icon-edit" type="primary" v-show="scope.row.data[5].updateTime!=''" @click="edititem(scope.$index, scope.row,5)" v-if="localStorage.getItem('USERID')==scope.row.data[5].chargerId||localStorage.getItem('USERID')==scope.row.leaderId||localStorage.getItem('ISLEADER')=='是'"></el-link>

															</template>
														</el-table-column>
													</el-table-column>

												</el-table>
											</el-form>
										</template>
									</el-table-column>
									<el-table-column v-for="column in tablecolums"
													 v-bind:prop="column.prop"
													 v-bind:label="column.label"
									 				 v-bind:min-width="column.width"
													 show-overflow-tooltip
									>
										  <template slot-scope="scope">
												<el-link v-if ="column.prop == 'documentNumber' &&  (scope.row.leaderId == localStorage.getItem('USERID') || localStorage.getItem('ISMANAGER')=='是')" type="primary" @click="docshow(scope.$index, scope.row)" >{{ scope.row.documentNumber}}</el-link>
												<el-link v-else-if ="column.prop == 'compname' &&  (scope.row.leaderId == localStorage.getItem('USERID') || localStorage.getItem('ISMANAGER')=='是')" type="primary" @click="editbase(scope.$index, scope.row)" >{{ scope.row.compname}}</el-link>
												<span v-else-if ="column.prop == 'phone' && localStorage.getItem('ISMANAGER')=='是'" >{{ scope.row[column.prop]}}</span>
												<span v-else-if ="column.prop == 'phone' && scope.row.leaderId != localStorage.getItem('USERID')" >*************</span>
												<span v-else>{{ scope.row[column.prop]}}</span>
										  </template>
									</el-table-column>
									<el-table-column label="操作" min-width="50">
										<template slot-scope="scope">
											<el-link type="primary" @click="edit(scope.$index, scope.row)">编辑</el-link>
										</template>
									</el-table-column>
								</el-table>
								<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentPageChange" :current-page="queryForm.pageNo"
								 :page-sizes="queryForm.pagesizes" :page-size="queryForm.pagesize" background layout="total,sizes, prev, pager, next"
								 :total="pagetotal">
								</el-pagination>
							</div>
		</div>
		</el-card>
		</el-container>
		</el-container>
		<el-dialog :close-on-click-modal="false" title="编辑账本" :visible.sync="dialogEditFormVisible" width="600px">
			<el-form :model="transForm" ref="transForm" label-width="120px" :rules="transFormrules">
				<el-tabs :value="tabdistributevalue">
					<el-tab-pane label="基础信息" name="base">
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="合同号" prop="contractNumber">
									<el-input v-model="transForm.contractNumber"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="档案号" prop="documentNumber">
									<el-input v-model="transForm.documentNumber"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="12">
								<el-form-item label="财税分组" prop="taxGroup">
									<el-select v-model="transForm.taxGroup">
										<el-option v-for="item in depts" :key="item.id" :label="item.name" :value="item.id">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="税控盘" prop="TCP">
										<el-select v-model="transForm.TCP">
											<el-option v-for="item in TCPS" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="续费情况" prop="renew">
									<el-radio v-model="transForm.renew" label="续费">续费</el-radio>
									<el-radio v-model="transForm.renew" label="未续费">未续费</el-radio>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="账本重建" prop="retry">
									<el-radio v-model="transForm.retry" label="是">是</el-radio>
									<el-radio v-model="transForm.retry" label="否">否</el-radio>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="8">
								<el-form-item label="代账月数" prop="amount">
									<el-input v-model="transForm.amount" :disabled="transForm.retry == '否'"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="16">
								<el-form-item label="截止日期" prop="enddate">
									<el-date-picker v-model="transForm.enddate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"  :disabled="transForm.retry == '否'">
									</el-date-picker>
								</el-form-item>
							</el-col>
						</el-row>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="16">
								<el-form-item label="财税负责人" prop="leaderId">
									<el-select v-model="transForm.leaderId" placeholder="请选择" filterable clearable>
										<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="20">
								<el-form-item label="备注" prop="remake">
									<el-input v-model="transForm.remake" maxlength="250"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
					</el-tab-pane>
					<el-tab-pane label="负责人员" name="chooseperson">
						<template>

							<el-table border :data="transForm.members" ref="table" tooltip-effect="dark" height="auto" width="1000"
							 class="tabledistribute" :row-style="showRow">
								<el-table-column v-for="column in distridetailcolums" v-bind:prop="column.prop" v-bind:label="column.label"
								 v-bind:min-width="column.width" show-overflow-tooltip>
								</el-table-column>
								>
								<el-table-column min-width="80">
									<template slot="header">
										<p>
											事项负责人
											<span style="color:red;font-size:16px;">*</span>
										</p>
									</template>
									<template slot-scope="scope">
										<el-form-item :prop="'members.'+scope.$index+'.chargerId'" :rules="keepaccountFormRules.chargerId"
										 label-width="0px">
											<el-select v-model="scope.row.chargerId" placeholder="请选择" filterable clearable>

												<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
												</el-option>
											</el-select>
										</el-form-item>
									</template>
								</el-table-column>
							</el-table>
						</template>
					</el-tab-pane>
				</el-tabs>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogEditFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="editcofirm">确 定</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="添加/编辑 办理事项" :visible.sync="dialogItemFormVisible" width="600px">
			<el-form :model="keepaccountDetailForm" ref="keepaccountDetailForm" :rules="keepaccountDetailFormrules" label-width="100px">
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="事项" prop="matter">
							<el-select v-model="keepaccountDetailForm.matter" placeholder="请选择" filterable clearable default-first-option
							 :disabled="action!='additem'" allow-create>
								<el-option v-for="item in handleitems" :key="item" :label="item" :value="item">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="状态" prop="status">
							<el-select v-model="keepaccountDetailForm.status" placeholder="请选择" filterable clearable>
								<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="16">
						<el-form-item label="月份" prop="enddate">
							<el-select v-model="keepaccountDetailForm.enddate" placeholder="请选择" filterable clearable :disabled="action!='additem'">

							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="事项负责人" prop="chargerId">
							<el-select v-model="keepaccountDetailForm.chargerId" placeholder="请选择" filterable clearable>
								<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
								</el-option>
								<!-- 								<el-option v-for="item in members" :key="item.id" :label="item.name" :value="item.id">
								</el-option> -->
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="备注" prop="remake">
							<el-input v-model="keepaccountDetailForm.remake" maxlength="100" style="width: 217px;"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20" v-if="action!='additem'">
					<el-col :span="24">
						<el-form-item label="证据上传" prop="evidence">
							<el-upload class="avatar-uploader" ref="upload" multiple :limit="20" :file-list="fileList" :action="uploadurl + keepaccountDetailForm.keepaccountid+'/'+keepaccountDetailForm.id"
							 :headers="headers" list-type="picture" :on-preview="handledownloadPreview" :on-remove="handleRemove"
							 :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
								<i class="el-icon-plus">点击上传图片不超过20张图片</i>
							</el-upload>

						</el-form-item>
					</el-col>
				</el-row>



			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogItemFormVisible = false">取 消</el-button>
				<el-button type="primary" :disabled="submitDisable" @click="itemcofirm">确 定</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="添加账本" :visible.sync="dialogFormVisible" width="1000px">
			<el-form :model="keepaccountForm" ref="keepaccountForm" label-width="120px" :rules="keepaccountFormRules">
				<el-tabs :value="tabvalue">
					<el-tab-pane label="基础信息" name="base">
						<el-row :gutter="20">
							<el-col :span="8">
								<el-form-item label="公司名称" prop="customerId">
									<el-select v-model="keepaccountForm.customerId" filterable remote reserve-keyword placeholder="请输入公司名称"
									 :remote-method="remoteMethod" :loading="loading">
										<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
							</el-col>
							<el-col :span="8">
								<el-form-item label="合同号" prop="contractNumber">
									<el-input v-model="keepaccountForm.contractNumber"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="档案号" prop="documentNumber">
									<el-input v-model="keepaccountForm.documentNumber"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="8">
								<el-form-item label="财税分组" prop="taxGroup">
									<el-select v-model="keepaccountForm.taxGroup">
										<el-option v-for="item in depts" :key="item.id" :label="item.name" :value="item.id">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col :span="8">
									<el-form-item label="税控盘" prop="TCP">
										<el-select v-model="keepaccountForm.TCP" >
											<el-option v-for="item in TCPS" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
									</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="续费情况" prop="renew">
									<el-radio v-model="keepaccountForm.renew" label="续费">续费</el-radio>
									<el-radio v-model="keepaccountForm.renew" label="未续费">未续费</el-radio>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="8">
								<el-form-item label="截止日期" prop="enddate">
									<el-date-picker v-model="keepaccountForm.enddate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
									</el-date-picker>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="财税负责人" prop="leaderId">
									<el-select v-model="keepaccountForm.leaderId" placeholder="请选择" filterable clearable>
										<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-form-item label="备注" prop="remake">
									<el-input v-model="keepaccountForm.remake" type="textarea" maxlength="250"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
					</el-tab-pane>
					<el-tab-pane label="选择业务" name="business">
						<el-row :gutter="5">
							<el-col :span="2" :offset="22">
								<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addService()" v-show="addBusinessShow">添加</el-button>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="24">
								<el-table border :data="serviceForm.service" ref="multipleTable" tooltip-effect="dark"  height="200"
								 class="addkeepaccount" style="width: 100%;">
									<el-table-column v-for="column in detailcolums" v-bind:prop="column.prop" v-bind:label="column.label"
									 v-bind:min-width="column.width" show-overflow-tooltip>
									</el-table-column>
									<el-table-column label="操作" min-width="50">
										<template slot-scope="scope">
											<el-tooltip class="item" effect="dark" content="编辑" placement="top-start">
												<el-link type="primary" icon="el-icon-edit" @click="editService(scope.$index, scope.row)"></el-link>
											</el-tooltip>
											<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
												<el-link type="danger" icon="el-icon-delete" @click="delService(scope.$index, scope.row)"></el-link>
											</el-tooltip>
										</template>
									</el-table-column>
								</el-table>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="6">
								<el-form-item label="数量" prop="amount">
									<el-input v-model="keepaccountForm.amount" readonly></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="单位" prop="unit">
									<el-input v-model="keepaccountForm.unit" style="width: 200px;" readonly></el-input>
								</el-form-item>
							</el-col>
					</el-tab-pane>
					<el-tab-pane label="负责人员" name="chooseperson">
						<template>

							<el-table border :data="keepaccountForm.members" ref="table" tooltip-effect="dark"  height="auto"
							 width="1000" :row-style="showRow" class="tableBox">
								<el-table-column v-for="column in distridetailcolums" v-bind:prop="column.prop" v-bind:label="column.label"
								 v-bind:min-width="column.width" show-overflow-tooltip>
								</el-table-column>
								>

								<el-table-column min-width="80">
									<template slot="header">
										<p>
											事项负责人
											<span style="color:red;font-size:16px;">*</span>
										</p>
									</template>
									<template slot-scope="scope">
										<el-form-item :prop="'members.'+scope.$index+'.chargerId'" :rules="keepaccountFormRules.chargerId"
										 label-width="0px">
											<el-select v-model="scope.row.chargerId" placeholder="请选择" filterable>
												<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
												</el-option>
											</el-select>
										</el-form-item>
									</template>
								</el-table-column>
							</el-table>

						</template>
					</el-tab-pane>
				</el-tabs>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="agentconfirm" :disabled="submitDisable">确 定</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="服务信息" :visible.sync="dialogserviceFormDetailVisible" width="1000px">
			<el-form :model="serviceFormDetail" :rules="serviceFormDetailRules" ref="serviceFormDetail" label-width="80px">
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="服务名称" prop="name">
							<el-select v-model="serviceFormDetail.name" filterable @change="servicechange">
								<el-option v-for="item in services" :key="item.id" :label="item.name" :value="item.id">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="规格" prop="spec">
							<span>{{serviceFormDetail.spec}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="类别" prop="type">
							<span>{{serviceFormDetail.type}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="数量" prop="amount">
							<el-input v-model="serviceFormDetail.amount"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="单位" prop="unit">
							<el-input v-model="serviceFormDetail.unit"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="单价" prop="price">
							<el-input v-model="serviceFormDetail.price"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="成本金额" prop="cost">
							<el-input v-model="serviceFormDetail.cost"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="收款金额" prop="totalprice">
							<el-input v-model="serviceFormDetail.totalprice"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="备注" prop="memo">
							<el-input v-model="serviceFormDetail.memo"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-table border :data="serviceFormDetail.service" ref="serviceFormDetailTable" tooltip-effect="dark" 
						 height="200" @row-click="serviceDetailClick" style="width: 100%;">
							<el-table-column v-for="column in detailcolums" v-bind:prop="column.prop" v-bind:label="column.label"
							 v-bind:min-width="column.width" show-overflow-tooltip>
							</el-table-column>
						</el-table>
					</el-col>
				</el-row>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogserviceFormDetailVisible = false">取 消</el-button>
				<el-button type="primary" @click="confirmService" :disabled="submitDisable">确 定</el-button>
			</div>
		</el-dialog>

		<el-dialog :close-on-click-modal="false" title="客户信息" :visible.sync="dialogEditBaseFormVisible" width="900px">
			<el-form :model="customerForm" ref="customerForm" label-width="100px" :rules="customerFormrules">
						<el-row :gutter="20">
							<el-col :span="16">
								<el-form-item label="客户名称" prop="compname">
									<el-input v-model="customerForm.compname"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="联系人" prop="contacter">
									<el-input v-model="customerForm.contacter"></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row :gutter="20">
							<el-col :span="8">
								<el-form-item label="电话" prop="phone">
									<el-input v-model="customerForm.phone"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="税务类型" prop="taxtype">
									<el-select v-model="customerForm.taxtype" placeholder="请选择" filterable clearable>
										<el-option v-for="item in taxtypeoptions" :key="item.value" :label="item.label" :value="item.value">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogEditBaseFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="editbaseconfirm">确 定</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="客户档案" :visible.sync="dialogDocFormVisible" width="900px">
			<el-form :model="customerForm" ref="customerForm" label-width="100px">
						<iframe :src="docsrc" frameborder="0" 
							style="width: 100%;height: 500px;"></iframe>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogDocFormVisible = false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="事项转移" :visible.sync="dialogUpdateFormVisible" width="350px">
			<el-form :model="updateForm" ref="updateForm" label-width="80px" :rules="updateFormrules">
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="负责事项" prop="matter">
							<el-select v-model="updateForm.matter" placeholder="请选择" filterable default-first-option>
								<el-option v-for="item in handleitems" :key="item" :label="item" :value="item">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="原负责人" prop="oldchargerId">
							<el-select v-model="updateForm.oldchargerId" placeholder="请选择" filterable>
								<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="新负责人" prop="newchargerId">
							<el-select v-model="updateForm.newchargerId" placeholder="请选择" filterable>
								<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.id">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="设定条件" prop="status">
							<el-select v-model="updateForm.status" placeholder="默认全部" filterable default-first-option>
								<el-option key="未完成" label="未完成" value="未完成"></el-option>
								<el-option key="已完成" label="已完成" value="已完成"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogUpdateFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="batchupdateconfirm">确 定</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="状态设定" :visible.sync="dialogstatusFormVisible" width="350px">
			<el-form :model="statusForm" ref="statusForm" label-width="80px" :rules="statusFormrules">
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="状态" prop="status">
							<el-select v-model="statusForm.status" placeholder="默认全部" filterable default-first-option>
								<el-option key="未完成" label="未完成" value="未完成"></el-option>
								<el-option key="已完成" label="已完成" value="已完成"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="备注" prop="memo">
							<el-input v-model="statusForm.memo"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogstatusFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="statussetconfirm">确 定</el-button>
			</div>
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="客户档案" :visible.sync="dialogDocFormVisible" width="900px">
			<el-form :model="customerForm" ref="customerForm" label-width="100px">
						<iframe :src="docsrc" frameborder="0"
							style="width: 100%;height: 500px;"></iframe>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogDocFormVisible = false">关闭</el-button>
			</div>
		</el-dialog>

		<el-dialog :visible.sync="imgdialogVisible">
			<img width="100%" :src="imgdialogImageUrl" alt="">
		</el-dialog>
		<el-dialog :close-on-click-modal="false" title="批量修改" :visible.sync="dialogEditFormTypeVisible" width="600px">
			<el-form :model="updateTypeForm" ref="updateTypeForm" label-width="80px" :rules="updateTypeFormrules">
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="修改字段" prop="typeS">
							<el-select v-model="updateTypeForm.typeSX" placeholder="请选择" filterable default-first-option>
								<el-option v-for="item in updateTypeForm.typeS" :key="item" :label="item" :value="item">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="修改为" prop="typeSS">
							<el-select v-model="updateTypeForm.typeSSX" placeholder="请选择" filterable>
								<el-option v-for="item in updateTypeForm[updateTypeForm.typeSX]" :key="item" :label="item" :value="item">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogEditFormTypeVisible = false">取 消</el-button>
				<el-button type="primary" @click="updateTypeBatch">确 定</el-button>
			</div>
		</el-dialog>
		</template>
		</div>
	</body>

	<script src="./js/keep_account.js"></script>
	</script>
</html>
